home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / Direct3D / EnvMapping / CubeMap / readme.txt < prev    next >
Encoding:
Text File  |  2001-10-10  |  2.8 KB  |  63 lines

  1. //-----------------------------------------------------------------------------
  2. // Name: CubeMap Direct3D Sample
  3. // 
  4. // Copyright (c) 1998-2001 Microsoft Corporation. All rights reserved.
  5. //-----------------------------------------------------------------------------
  6.  
  7.  
  8. Description
  9. ===========
  10.    The CubeMap sample demonstrates an enviroment-mapping technique called 
  11.    cube-mapping. Environment-mapping is a technique in which the environment
  12.    surrounding a 3D object (such as the lights, etc.) are put into a texture
  13.    map, so that the object can have complex lighting effects without expensive
  14.    lighting calculations.
  15.  
  16.    Note that not all cards support all features for all the various environment
  17.    mapping techniques (such as cubemapping and projected textures). For more
  18.    information on environment mapping, cubemapping, and projected textures, 
  19.    refer to the DirectX SDK documentation. 
  20.  
  21.  
  22. Path
  23. ====
  24.    Source:     DXSDK\Samples\Multimedia\D3D\EnvMapping\CubeMap
  25.    Executable: DXSDK\Samples\Multimedia\D3D\Bin
  26.  
  27.  
  28. User's Guide
  29. ============
  30.    The following keys are implemented. The dropdown menus can be used for the
  31.    same controls.
  32.       <Enter>     Starts and stops the scene
  33.       <Space>     Advances the scene by a small increment
  34.       <F2>        Prompts user to select a new rendering device or display mode
  35.       <Alt+Enter> Toggles between fullscreen and windowed modes
  36.       <Esc>       Exits the app.
  37.  
  38.  
  39. Programming Notes
  40. =================
  41.    Cube-mapping is a technique which employs a 6-sided texture. Think of the
  42.    being inside a wall-papered room, and having the wallpaper shrink-wrapped
  43.    around an object. Cube-mapping is superior to sphere-mapping because the
  44.    latter is inherently view-dependant (spheremaps are constructed for one
  45.    particular viewpoint in mind). Cubemaps also have no geometry
  46.    distortions, so they can be generated on the fly using SetRenderTarget()
  47.    for each of the 6 cubemap's faces.
  48.  
  49.    Cube-mapping works with Direct3D texture coordinate generation. By setting
  50.    D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR, Direct3D will generate cubemap 
  51.    texture coordinates from the reflection vector for a vertex, thereby making
  52.    this technique easy for environment-mapping effects where the environment
  53.    is reflected in the object.
  54.  
  55.    On hardware which does not support cube-maps, this sample will dynamically
  56.    create a spheremap each frame, and use that instead.  Creation of the
  57.    spheremap is done using the ID3DXRenderToEnvMap interface.
  58.    
  59.    This sample makes use of common DirectX code (consisting of helper functions,
  60.    etc.) that is shared with other samples on the DirectX SDK. All common
  61.    headers and source code can be found in the following directory:
  62.       DXSDK\Samples\Multimedia\Common
  63.